
import http from './http'
// 首页头部-底部信息
const getHeadAndTailData = () => {
    return http.get(
        '/api/index/getHeadAndTailData'
    )
}
// 首页轮播图
const getSlideData = () => {
    return http.get(
        '/api/index/getSlideData'
    )
}
// 首页新闻
const getHomeArticleData = (page) => {
    return http.get(
        '/api/index/getArticleData',
        {params:{page}}
    )
}
// 合作伙伴列表
const getFriendData = () => {
    return http.get(
        '/api/index/getFriendData'
    )
}
// 获取最新资讯
const getNewArticle = () => {
    return http.get(
        '/api/journalism/getNewArticle'
    )
}
// 获取PC新闻文章列表
const getArticleData = (page) => {
    return http.get(
        '/api/journalism/getArticleData',
        {params:{page}}
    )
}
// 获取新闻置顶数据
const getTopData = (page) => {
    return http.post(
        '/api/Journalism/getTopData',
        {page}
    )
}
// 获取新闻详情
const getNewsDetails = (id) => {
    return http.get(
        '/api/journalism/getDetails',
        {params:{id}}
    )
}
// 联系我们
const getContactData = () => {
    return http.get(
        '/api/contact/getContactData'
    )
}
// 添加需求
const addDemand = (data) => {
    return http.post(
        '/api/contact/addDemand',
        {...data}
    )
}
// 经典案例左侧nav接口
const getProjectCateData = () => {
    return http.get(
        '/api/Project/getProjectCateData'
    )
}
// 首页经典案例
const  getHomeCateData = () => {
    return http.get(
        '/api/index/getProjectCateData'
    )
}
// 根据项目分类ID获取项目案例列表
const getProjectData = (cate_id,page,limit) => {
    return http.get(
        '/api/Project/getProjectData',
        {params:{cate_id,page,limit}}
    )
}
// 获取项目详情
const getProjectDetails = (id) => {
    return http.post(
        '/api/Project/getProjectDetails',
        {id}
    )
}
// 新闻列表
const getMobileArticleData = (page) => {
    return http.get(
        '/api/journalism/getMobileArticleData',
        {params:{page}}
    )
}
export {
    getHeadAndTailData,
    getSlideData,
    getHomeArticleData,
    getFriendData,
    getContactData,
    addDemand,
    getNewArticle,
    getArticleData,
    getTopData,
    getNewsDetails,
    getProjectCateData,
    getProjectData,
    getProjectDetails,
    getHomeCateData,
    getMobileArticleData
}